package com.wpre.springblog;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-10-28
 * Time: 19:26
 */


//Bean名称为UController
@Controller()
public class UController {

    //Bean名称为getUser1
    @Bean
    public User getUser1() {
        return new User();
    }

    //Bean名称为myName
    @Bean("myName")
    public User getUser2(){
        return new User();
    }
}
